xen/vsprintf: Avoid returning NULL from number()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 21 Apr 2016 13:47:12 +0000 (14:47 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Jun 2016 13:30:33 +0000 (14:30 +0100)
commitce34d6b036ed84b12da6cd90a40a1302df4f1fef
treea2366234406533b5306f534430611fba9e17eb7b
parente9151dbe35611778d70a1ad2698af60141ea0418
xen/vsprintf: Avoid returning NULL from number()

In practice this is an unused codepath, as every caller of number() passes an
explicit base of 8, 10 or 16.  For all other uses, number() returns a pointer
between the str and end parameters, as do the other similar helper functions.

However, the fact that there is a NULL return path causes Coverity to check
whether the caller makes NULL checks on the return value, and complain.

Change the conditional return into an ASSERT().

No functional change, but this removes 21 instances of NULL_RETURN in
Coverity.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
xen/common/vsprintf.c